<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="xml" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib prefix="c1" uri="http://java.sun.com/jsp/jstl/core_1_1" %>
<%--
  Created by IntelliJ IDEA.
  User: wstar
  Date: 01.11.2020
  Time: 23:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8" language="java" trimDirectiveWhitespaces="true" %>
<% response.setHeader("subject", "Invitation to pool"); %>
<sql:query var="total" dataSource="jdbc/PoolingDB" sql="select * from poolquestion limit 1"/>
<c:set var="req" value="${pageContext.request}" scope="application"/>
<c:set var="baseUrl" value="${req.scheme}://${req.serverName}:${req.serverPort}" scope="application"/>
<c:set var="inviteUrl" value="${baseUrl}/index.html?invitation=${invitation.id}&pool=${pool.id}" scope="request"/>
<html>
<head>
    <title>Invitation</title>
</head>
<body>
<p>You are invited to our greatest pool at <a href="${inviteUrl}">${pool.title}</a></p>
<div>${pool.description}</div>
<div>${total.rows[0].title}</div>
<xml:transform>
</xml:transform>
</body>
</html>
